package main

import (
	"port-forwarding/config"
	"port-forwarding/server"
)

var (
	target string
	port   int
)

//func Init() {
//	flag.StringVar(&target, "target", "", "target (<host>:<port>)")
//	flag.IntVar(&port, "port", 1337, "port")
//}

func main() {
	var listenAddr, forwardAddr string
	appConfig := new(config.Config)
	appConfig.InitServer()
	listenAddr = appConfig.ListenAddr
	forwardAddr = appConfig.ForwardAdr
	server.ListenAndServe(listenAddr, forwardAddr, appConfig)
}
